package com.niiwoo.civet.trade.enums;

import com.niiwoo.tripod.provider.exception.NoSuchEnumValueException;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 评测等级 1：保守型；2：稳键型；3：积级型；
 * Created by zhangwanli on 2017/11/27.
 */
@Getter
@AllArgsConstructor
public enum EvaluationLevelEnum {
    CONSERVATIVE((byte) 1, "保守型"),
    STEADY((byte) 2, "稳键型"),
    POSITIVE((byte) 3, "积级型");
    private final Byte value;
    private final String desc;

    public static EvaluationLevelEnum enumOf(Byte value) {
        for (EvaluationLevelEnum levelEnum : values()) {
            if (levelEnum.value.equals(value)) {
                return levelEnum;
            }
        }
        throw new NoSuchEnumValueException("EvaluationLevelEnum:" + value);
    }

}
